package controllers

import "github.com/kongyixueyuan.com/kongyixueyuan/web/webservice"

type UserController struct {
	Common
}

func NewUserController() *UserController {
	return &UserController{}
}

func (u *UserController) GetHello() {
	u.ReturnSuccess("Hello World ~")
}
func (u *UserController) GetLogin() {
	ser := webservice.NewUserService(u.Ctx)
	if ser.Login() {
		u.ReturnIntData(1)
	} else {
		u.ReturnIntData(0)
	}
}
func (u *UserController) GetRegister() {
	//ser := webservice.NewUserService(u.Ctx)
	//ser.Register()
	u.ReturnSuccess("Register successful ~ ")
}
